package com.ruoyi.statistics.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.statistics.mapper.StatisticsTrainMapper;
import com.ruoyi.statistics.domain.StatisticsTrain;
import com.ruoyi.statistics.service.IStatisticsTrainService;
import com.ruoyi.common.core.text.Convert;

/**
 * 技术培训 服务层实现
 * 
 * @author ruoyi
 * @date 2019-11-11
 */
@Service
public class StatisticsTrainServiceImpl implements IStatisticsTrainService 
{
	@Autowired
	private StatisticsTrainMapper statisticsTrainMapper;

	/**
     * 查询技术培训信息
     * 
     * @param id 技术培训ID
     * @return 技术培训信息
     */
    @Override
	public StatisticsTrain selectStatisticsTrainById(Long id)
	{
	    return statisticsTrainMapper.selectStatisticsTrainById(id);
	}
	
	/**
     * 查询技术培训列表
     * 
     * @param statisticsTrain 技术培训信息
     * @return 技术培训集合
     */
	@Override
	public List<StatisticsTrain> selectStatisticsTrainList(StatisticsTrain statisticsTrain)
	{
	    return statisticsTrainMapper.selectStatisticsTrainList(statisticsTrain);
	}
	
    /**
     * 新增技术培训
     * 
     * @param statisticsTrain 技术培训信息
     * @return 结果
     */
	@Override
	public int insertStatisticsTrain(StatisticsTrain statisticsTrain)
	{
	    return statisticsTrainMapper.insertStatisticsTrain(statisticsTrain);
	}
	
	/**
     * 修改技术培训
     * 
     * @param statisticsTrain 技术培训信息
     * @return 结果
     */
	@Override
	public int updateStatisticsTrain(StatisticsTrain statisticsTrain)
	{
	    return statisticsTrainMapper.updateStatisticsTrain(statisticsTrain);
	}

	/**
     * 删除技术培训对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteStatisticsTrainByIds(String ids)
	{
		return statisticsTrainMapper.deleteStatisticsTrainByIds(Convert.toStrArray(ids));
	}
	
}
